
<header id="header">
	<nav id="Msup">
			<?php
			
$this->widget ( 'zii.widgets.CMenu', array (
					'items' => array (
							array (
									'label' => 'Home',
									'url' => array (
											'/site/index' 
									) 
							),
							array (
									'label' => 'Sobre mim',
									'url' => array (
											'/site/page',
											'view' => 'about' 
									) 
							),
							array (
									'label' => 'Entre em contato',
									'url' => array (
											'/site/contact' 
									) 
							),
							array (
									'label' => 'Sign in',
									'url' => array (
											'/site/login' 
									) 
							),
							array (
									'label' => 'Logout (' . Yii::app ()->user->name . ')',
									'url' => array (
											'/site/logout' 
									),
									'visible' => ! Yii::app ()->user->isGuest 
							) 
					) 
			) );
			?>
		</nav>
	<div id="head"></div>
	<nav id="Minf">
					<?php
					
$this->widget ( 'zii.widgets.CMenu', array (
							'items' => array (
									array (
											'label' => 'Artigos',
											'url' => array (
													'/site/index' 
											) 
									),
									array (
											'label' => 'Vídeos',
											'url' => array (
													'/site/page',
													'view' => 'about' 
											) 
									),
									array (
											'label' => 'Screenshots',
											'url' => array (
													'/site/contact' 
											) 
									),
									array (
											'label' => 'Tutoriais',
											'url' => array (
													'/site/login' 
											) 
									),
									array (
											'label' => 'Promoções',
											'url' => array (
													'/site/login' 
											) 
									),
									array (
											'label' => 'Parcerias',
											'url' => array (
													'/site/login' 
											) 
									),
									array (
											'label' => 'Forum',
											'url' => array (
													'/site/login' 
											) 
									) 
							) 
					) );
					?>
		</nav>
</header>
<div id="main-div">
	<div id="content">
			<?php rsort($model); ?>
				
				<div id="title-div">
			<h1>
				<i><?php echo $model[0]->title?></i>
			</h1>
			<h6><?php echo $model[0]->create_time;?><br />
			</h6>
		</div>
		<div id="contentpost-div">
			<p>
			
			
			<h4><?php echo $model[0]->content;?> <p>
				
				
				<h6>
					Postado por <a href="#">Mestre Tibiano</a> 
						<p>
			</h4>
		</div>
		<i><h4>
				Comentarios deste post:<br />
			</h4></i>

		<div id="comentarios">
			
			<?php foreach($coments as $data):?>
			<?php echo "<i>$data->author em $data->create_time diz:<br/></i> $data->content<br/><br/>"?>
			
			<?php endforeach;?>
		<p></p>
			<div id="comentar"></div>
		</div>

	</div>
	<div id="menu-lateral">
		<div id="titleposts">Postagens</div>
			<?php
			$meses = array (
					'January',
					'February',
					'March',
					'April',
					'May',
					'June',
					'July',
					'August',
					'September',
					'October',
					'November',
					'December' 
			);
			foreach ( $meses as $mes ) :
				$booleano = false?>
					<?php foreach($model as $data):?>
						<?php
					$m = explode ( " ", $data->create_time );
					if ($m [3] == $mes) {
						if ($booleano == false) {
							$booleano = true;
							echo "<br/><h5>$mes</h5><br/>";
						}
						echo "<ul><li>$data->title</li></ul>";
					}
					?>
					<?php endforeach?>
				<?php endforeach?>

			<div id="titleposts">Twitter</div>
		<br /> <a class="twitter-timeline"
			href="https://twitter.com/binaryvision"
			data-widget-id="445249757175246848">Tweets by @binaryvision</a>
		<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
		<br />


		<div id="titleposts">Curta</div>
		<br />
		<iframe
			src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FFacebookDevelopers&amp;width&amp;height=290&amp;colorscheme=light&amp;show_faces=true&amp;header=true&amp;stream=false&amp;show_border=true"
			scrolling="no" frameborder="0"
			style="border: none; overflow: hidden; height: 290px;"
			allowTransparency="true"></iframe>

		<div id="titleposts">Canais Youtube</div>
		<br/>
		<script src="https://apis.google.com/js/platform.js"></script>
		<script>
  		function onYtEvent(payload) {
    		if (payload.eventType == 'subscribe') {
      // Add code to handle subscribe event.
    } 		else if (payload.eventType == 'unsubscribe') {
      // Add code to handle unsubscribe event.
    }
    if (window.console) { // for debugging only
      window.console.log('YT event: ', payload);
    }
  }
</script>

		<div class="g-ytsubscribe" data-channel="Cateroide" data-layout="full"
			data-count="default" data-onytevent="onYtEvent"></div>
<br/>
	<script src="https://apis.google.com/js/platform.js"></script>
<br/>
		<script>
  function onYtEvent(payload) {
    if (payload.eventType == 'subscribe') {
      // Add code to handle subscribe event.
    } else if (payload.eventType == 'unsubscribe') {
      // Add code to handle unsubscribe event.
    }
    if (window.console) { // for debugging only
      window.console.log('YT event: ', payload);
    }
  }
</script>

		<div class="g-ytsubscribe" data-channel="Fanaticsgamez"
			data-layout="full" data-count="default" data-onytevent="onYtEvent"></div>

	<br/>
	
	<br/>
	
	<script src="https://apis.google.com/js/platform.js"></script>

<script>
  function onYtEvent(payload) {
    if (payload.eventType == 'subscribe') {
      // Add code to handle subscribe event.
    } else if (payload.eventType == 'unsubscribe') {
      // Add code to handle unsubscribe event.
    }
    if (window.console) { // for debugging only
      window.console.log('YT event: ', payload);
    }
  }
</script>

<div class="g-ytsubscribe" data-channel="Tibiarte" data-layout="full" data-count="default" data-onytevent="onYtEvent"></div>
<br/>
<br/>

<script src="https://apis.google.com/js/platform.js"></script>

<script>
  function onYtEvent(payload) {
    if (payload.eventType == 'subscribe') {
      // Add code to handle subscribe event.
    } else if (payload.eventType == 'unsubscribe') {
      // Add code to handle unsubscribe event.
    }
    if (window.console) { // for debugging only
      window.console.log('YT event: ', payload);
    }
  }
</script>

<div class="g-ytsubscribe" data-channel="HoxtonGamer" data-layout="full" data-count="default" data-onytevent="onYtEvent"></div>

<br/>
<br/>

<script src="https://apis.google.com/js/platform.js"></script>

<script>
  function onYtEvent(payload) {
    if (payload.eventType == 'subscribe') {
      // Add code to handle subscribe event.
    } else if (payload.eventType == 'unsubscribe') {
      // Add code to handle unsubscribe event.
    }
    if (window.console) { // for debugging only
      window.console.log('YT event: ', payload);
    }
  }
</script>

<div class="g-ytsubscribe" data-channel="canaltibiabr" data-layout="full" data-count="default" data-onytevent="onYtEvent"></div>
<br/>
	</div>
	<div id="bottom-div">Tapume3: Aqui vão ficar os artigos</div>




</div>